package com.ruoyi.anfang.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.anfang.mapper.MoMessageLogMapper;
import com.ruoyi.anfang.domain.MoMessageLog;
import com.ruoyi.anfang.service.IMoMessageLogService;

/**
 * 短信记录Service业务层处理
 * 
 * @author wzy
 * @date 2024-07-16
 */
@Service
public class MoMessageLogServiceImpl implements IMoMessageLogService 
{
    @Autowired
    private MoMessageLogMapper moMessageLogMapper;

    /**
     * 查询短信记录
     * 
     * @param id 短信记录主键
     * @return 短信记录
     */
    @Override
    public MoMessageLog selectMoMessageLogById(Long id)
    {
        return moMessageLogMapper.selectMoMessageLogById(id);
    }

    /**
     * 查询短信记录列表
     * 
     * @param moMessageLog 短信记录
     * @return 短信记录
     */
    @Override
    public List<MoMessageLog> selectMoMessageLogList(MoMessageLog moMessageLog)
    {
        return moMessageLogMapper.selectMoMessageLogList(moMessageLog);
    }

    /**
     * 新增短信记录
     * 
     * @param moMessageLog 短信记录
     * @return 结果
     */
    @Override
    public int insertMoMessageLog(MoMessageLog moMessageLog)
    {
        moMessageLog.setCreateTime(DateUtils.getNowDate());
        return moMessageLogMapper.insertMoMessageLog(moMessageLog);
    }

    /**
     * 修改短信记录
     * 
     * @param moMessageLog 短信记录
     * @return 结果
     */
    @Override
    public int updateMoMessageLog(MoMessageLog moMessageLog)
    {
        moMessageLog.setUpdateTime(DateUtils.getNowDate());
        return moMessageLogMapper.updateMoMessageLog(moMessageLog);
    }

    /**
     * 批量删除短信记录
     * 
     * @param ids 需要删除的短信记录主键
     * @return 结果
     */
    @Override
    public int deleteMoMessageLogByIds(Long[] ids)
    {
        return moMessageLogMapper.deleteMoMessageLogByIds(ids);
    }

    /**
     * 删除短信记录信息
     * 
     * @param id 短信记录主键
     * @return 结果
     */
    @Override
    public int deleteMoMessageLogById(Long id)
    {
        return moMessageLogMapper.deleteMoMessageLogById(id);
    }
}
